using System;
using System.Collections.Generic;
using System.Text;
using BUS;
using DTO;
using System.Data;

namespace DAO
{
    
    public class QuanHeThanhPhoDAO: SqlDataHelper
    {
        private string table;
        public QuanHeThanhPhoDAO()
	    {
		    //
		    // TODO: Add constructor logic here
		    //
            this.table = "QuanHeThanhPho";
	    }
        
        public string th_KhoangCach2ThanhPho(int tp1, int tp2) {
            string sql;
            DataSet ds;
            try
            {
                sql = "select KhoangCach from " + this.table+" where ThanhPhoDi ="+tp1+" and ThanhPhoDen ="+ tp2+"";
                ds = new DataSet();
                ds = this.ExecuteQuery(sql);

                return ds.Tables[0].Columns[0].ToString() ;
                //    return true;
                //return false;
            }
            catch (Exception ex)
            {

                return "";
            }
        }
    }
    
}
